// MySPI.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "MySPI.h"
#include "DataFormat.h"

#pragma data_seg(".config")
bool m_Enabled=FALSE;
Parameter m_Parameter={0};
#pragma data_seg()

#ifdef _MANAGED
#pragma managed(push, off)
#endif

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	if(ul_reason_for_call==DLL_PROCESS_ATTACH)
	{
		OutputDebugString(L"Loading IPFilter ..."); 
	}
	return TRUE;
}

MYSPI_API void  SetMode(bool enabled)
{
	m_Enabled=enabled;
}

MYSPI_API bool  GetMode()
{
	return m_Enabled;
}

MYSPI_API PParameter GetParameter()
{
	return &m_Parameter;
}

#ifdef _MANAGED
#pragma managed(pop)
#endif
